<?php
/**
 * @var $errors string
 * @var $commentData array
 */
?>
<hr />
<?php // 报告项目符号点列表中的任何错误 ?>
<?php if ($errors): ?>
    <div style="border: 1px solid #ff6666; padding: 6px;">
        <ul>
            <?php foreach ($errors as $error): ?>
                <li><?php echo $error ?></li>
            <?php endforeach ?>
        </ul>
    </div>
<?php endif ?>
<h3>添加你的评论</h3>
<form method="post">
    <p>
        <label for="comment-name">
            姓名:
        </label>
        <input type="text" id="comment-name" name="comment-name" value="<?php echo htmlEscape($commentData['name']) ?>"/>
    </p>
    <p>
        <label for="comment-website">
            网址:
        </label>
        <input type="text" id="comment-website" name="comment-website" value="<?php echo htmlEscape($commentData['website']) ?>"/>
    </p>
    <p>
        <label for="comment-text">
            内容:
        </label>
        <textarea id="comment-text" name="comment-text" rows="8" cols="70"><?php echo htmlEscape($commentData['text']) ?></textarea>
    </p>
    <input type="submit" value="提交 评论" />
</form>